﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;


namespace Framework.Core
{
    [Serializable]
    public class Credential
    {
        /// <summary>
        /// iAuthID
        /// </summary>
        public Int64 CredentialId { get; set; }

        /// <summary>
        /// dEndTime
        /// </summary>
        public DateTime ValidEndTime { get; set; }


        public bool IsValid { get; set; }


        internal RoleCredential[] RoleList { get; set; }

        [Serializable]
        internal class RoleCredential
        {
            public string Role { get; set; }

            public List<OrganizationScope> Scopes { get; set; }

            [Serializable]
            internal class OrganizationScope
            {
                /// <summary>
                /// 酒店结构
                /// </summary>
                public string OrgId { get; set; }
            }
        }
    }
}
